package com.wkck.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wkck.VO.CreateNoticeVo;
import com.wkck.VO.NoticeWithContentVo;
import com.wkck.VO.PageResult;
import com.wkck.VO.UploadContentVo;
import com.wkck.domain.NewsContent;
import com.wkck.domain.Notice;
import com.wkck.domain.NoticeContent;
import com.wkck.dto.GetNoticeConditionsDto;

import java.util.List;

/**
 * @Author: CK
 * @Date: 2024/03/25/13:09
 * @Description:
 */
public interface NoticeService extends IService<Notice> {

    /***
     * @Author: CK
     * @Date: 2024/3/25
     * @Param: []
     * @Description: 创建通知
     */
    CreateNoticeVo createNotice();

    /***
     * @Author: CK
     * @Date: 2024/3/25
     * @Param: [id]
     * @Description: 根据id获得通知信息
     */
    NoticeWithContentVo getNoticeAllById(Long id);

    /***
     * @Author: CK
     * @Date: 2024/3/25
     * @Param: [notice]
     * @Description: 修改通知信息
     */
    Boolean updateNotice(NoticeWithContentVo notice);

    /***
     * @Author: CK
     * @Date: 2024/3/26
     * @Param: [dto]
     * @Description: 查询所有通知数据
     */
    PageResult getNotices(GetNoticeConditionsDto dto);

    /***
     * @Author: CK
     * @Date: 2024/3/26
     * @Param: [ids]
     * @Description: 根据ids删除通知
     */
    Boolean removeNoticesByIds(List<String> ids);

    /****
     * @Author: CK
     * @Date: 2024/3/23
     * @Param: [notice]
     * @Description: 修改新闻状态
     */
    Boolean changeState(Notice notice);

    /***
     * @Author: CK
     * @Date: 2024/3/23
     * @Param: [id]
     * @Description: 预览新闻
     */
    NoticeContent getPreviewNoticeContent(Long id);

    /***
     * @Author: CK
     * @Date: 2024/3/26
     * @Param: [file, id]
     * @Description: 上传正文中图片
     */
    UploadContentVo uploadContentPhoto(String localFilePath, long size, String filename, Long id);
}
